﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using EmployeeApp.Service.Dto.Employee;
using EmployeeApp.DAL.Dal;

namespace EmployeeApp.Service
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IEmployeeService" in both code and config file together.
    [ServiceContract]
    public interface IEmployeeService
    {
        /*
            // Title
            public const string TITLE_Mr      = "Mr.";
            public const string TITLE_Miss    = "Miss.";
            public const string TITLE_Mrs     = "Mrs.";

            // JobTile
            // > 1
            public const int JOB_NOT_DEFINE   = 1;

            // MarriedStatus
            public const int SINGLE_STATUS   = 1;
            public const int MARRIED_STATUS  = 2;
            public const int DIVORCED_STATUS = 3;

            // Status
            public const int ALL_STATUS         = 0;
            public const int ACTIVE_STATUS      = 1;
            public const int INACTIVE_STATUS    = 2;
         
            // Order
            public const string SORT_ASCENDING     = "asc";
            public const string SORT_DESCENDING    = "desc";
         
            //---------------------------------------------------------------------------------------------------
            // 1. ResponseDto<List<EmployeeDto>> GetAll(GetAllRequestDto getAllRequestDto);
            //---------------------------------------------------------------------------------------------------
            // input (GetAllRequestDto)
            //-------------------------------------------------------
            // if input is null 			  => find all employee
            // xxx.Name and xxx.EmpId are not null => find all employee which have the defined value
            // xxx.Status is not null 		  => find all employee which have the status value
            //    ALL_STATUS       = 0;
            //    ACTIVE_STATUS    = 1;
            //    INACTIVE_STATUS  = 2;
            //  xxx.Sort is not null 		  => sort the result by the specify field
            //  xxx.SortType			      => specify the sorting method
            //    SORT_ASCENDING   = "asc";
            //    SORT_DESCENDING  = "desc";
            //---------------------------------------------------------
            // output  (ResponseDto<List<EmployeeDto>>)
            //---------------------------------------------------------
            // xxx.Data             => list of all Employee
            // xxx.Status
            //     true = success
            //     false = failure
            // xxx.ErrorMessage	    => message of error
            //------------------------------------------------------------------------------------
            // 2. ResponseDto<EmployeeDto> Add(AddRequestDto addRequestDto);
            //------------------------------------------------------------------------------------
            // input (AddRequestDto)
            //-------------------------------------------------------
            // xxx.Id : int, not null
            // xxx.EmpId : string(15), not null
            // xxx.Title : int, not null
            // xxx.Name : string(50), not null
            // xxx.Surname : string(50), not null
            // xxx.Address : string(255)
            // xxx.JobTitle : int, not null
            // xxx.MarriedStatus  : int , not null
            // xxx.Status : int , not null
            //-----------------------------------------------------------
            // output  (ResponseDto<EmployeeDto>)
            //----------------------------------------------------------
            // xxx.Data 			   => null (always)
            // xxx.Status
            //     true = success
            //     false = failure
            // xxx.ErrorMessage		   => message of error
            //-------------------------------------------------------------------------------------------
            // 3. ResponseDto<EmployeeDto> Update(UpdateRequestDto addRequestDto);
            //--------------------------------------------------------------------------------------------
            /------------------------------------------------------------------------------------
            // input (UpdateRequestDto)
            //-------------------------------------------------------
            // specify the changed data
            //----------------------------------------------------------
            // output  (ResponseDto<EmployeeDto>)
            //----------------------------------------------------------
            // xxx.Data 			   => null (always)
            // xxx.Status
            //     true = success
            //     false = failure
            // xxx.ErrorMessage		   => message of error
            //-------------------------------------------------------------------------------------------
            // 4. ResponseDto<EmployeeDto> Delete(DeleteRequestDto deleteRequestDto);
            //--------------------------------------------------------------------------------------------
            // input ( List<String> IdList) specify the list of Employee's Id
            //----------------------------------------------------------
            // output  (ResponseDto<EmployeeDto>)
            //----------------------------------------------------------
            // xxx.Data 			   => null (always)
            // xxx.Status
            //     true = success
            //     false = failure
            // xxx.ErrorMessage		   => message of error
         */

        [OperationContract] 
        ResponseDto<EmployeeDto> Add(EmployeeDto employeeDto);
        [OperationContract]
        ResponseDto<EmployeeDto> Delete(List<string> IdList);
        [OperationContract]
        ResponseDto<System.Collections.Generic.List<EmployeeDto>> GetAll(GetAllRequestDto employeeDto);
        [OperationContract]
        ResponseDto<EmployeeDto> Update(EmployeeDto employeeDto);
    }
}
